def division():
    print("==========分苹果=========\n")
    apple=int(input("请输入苹果的个数"))
    children=int(input("请输入来了几个小朋友:"))
    if apple<children:
        raise ValueError("苹果太少了  不够分")
    result=apple//children
    remain=apple-result*children
    if remain>0:
        print(apple,"个苹果,平均分给",children,"个小朋友,每个人",result,"个剩下",remain,"个。Git")
    else:
        print(apple,"个苹果,平均分给",children,"个小朋友,每个人",result,"个")
try: 
    division()
except ZeroDivisionError:
    print("\n出错了~~苹果不能被0个小朋友平分")
except ValueError as e:
    print("\n出错了~~~")
else:
    print("分苹果顺利完成。。。")
finally:
    print("进行了一次分苹果操作。")